package com.zy.dp.prototype.example4;

public class Client
{

	public static void main(String[] args) throws CloneNotSupportedException
	{

		PersonalOrder oa1 = new PersonalOrder();

		Product product = new Product();
		product.setName("产品1");
		oa1.setProduct(product);

		oa1.setOrderProductNum(100);
		System.out.println(oa1);

		PersonalOrder oa2 = (PersonalOrder) oa1.clone();
		oa2.getProduct().setName("产品2");
		oa2.setOrderProductNum(80);
		System.out.println(oa2);
		System.out.println(oa1);

	}

}
